package org.example.campsys.service;


import org.example.campsys.mapper.RootMapper;
import org.example.campsys.model.ActivityInfo;
import org.example.campsys.model.ClassInfo;
import org.example.campsys.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class RootService {

    @Autowired
    private RootMapper rootMapper;

    public List<UserInfo> selUser(){
        return rootMapper.selUser();
    }

    public Integer addManager(Integer userId){
        return rootMapper.addManager(userId);
    }
    public Integer addUser(UserInfo userInfo){
        return rootMapper.addUser(userInfo);
    }
    public Integer addRole(Integer id, Integer roleId){
        return rootMapper.addRole(id,roleId);
    }
    public Integer mngActivity(ActivityInfo activityInfo){
        return rootMapper.mngCategory(activityInfo);
    }
    public Integer mngClass(ClassInfo classInfo){
        return rootMapper.mngClass(classInfo);
    }
    public Integer updUser(UserInfo userInfo){return rootMapper.updUser(userInfo);}

}
